import 'package:flutter/material.dart';
import 'package:p_location/common/ui/base_filter_head_list_view.dart';
import 'package:p_location/common/ui/base_filter_tab_page.dart';
import 'package:p_location/home/ui/tab/tab_home_area_car_info.dart';
import 'package:p_location/home/ui/tab/tab_home_area_person_info.dart';

class PageTabAreaInfo extends BaseFilterTabPage {
  final int areaTreeId;
  final String areaName;
  final int type;

  @override
  BaseFilterTabPageState<BaseFilterTabPage> getState() {
    return new _PageTabAreaInfoState();
  }

  PageTabAreaInfo(this.areaTreeId, this.areaName, {this.type});
}

class _PageTabAreaInfoState extends BaseFilterTabPageState<PageTabAreaInfo> {
  @override
  List<BaseFilterHeadListView> getTabItemPage() {
    return [
      TabHomeAreaPersonInfo(widget.areaTreeId),
      TabHomeAreaCarInfo(widget.areaTreeId)
    ];
  }

  @override
  List<Tab> getTabTiles() {
    return [Tab(text: '人员'), Tab(text: '车辆')];
  }

  @override
  String getTitle() {
    return widget.areaName;
  }
}
